package com.xls.commonutils;

public enum ResultCode {

    SUCCESS(20000, "成功"),

    ERROR(20001, "失败"),

    TOKEN_EXPIRED(50014, "尚未登录,请登录!"),

    INVALID_TOKEN(50008, "invalid token"),

    NO_LOGIN(50004, "尚未登录,请登录!"),

    NO_PERMISSION(403, "权限不足,请联系管理员"),

    ERROR_USERNAME_OR_PASSWORD(601, "用户名或密码错误"),

    FORBIDDEN(602, "账号被禁用,请联系管理员"),

    ROOM_FULL(700, "宿舍满员"),

    ROOM_ZERO(701, "宿舍暂无人员"),

    NOT_APPROVED(702, "学生有未审核的入住/离宿信息"),

    ROOM_NOT_MATCH(703, "学生入住宿舍和离宿宿舍不匹配"),

    NOT_CHECKED_IN(704, "学生未入住"),

    CHECKED_IN(705, "学生已入住"),

    NO_STUDENT(705, "没有该学生，请输入正确的学号"),

    SAME_RNO(706, "修改后宿舍号与原宿舍号相同"),

    EXIST_RNO(707, "已存在该宿舍号"),

    WRONG_TIME(801, "来访时间不能晚于离开时间"),

    USERNAME_PASSWORD_ERROR(999, "用户名或密码错误")
    ;

    private Integer code;

    private String message;

    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
